package com.qingke.hibernate.bean;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

@Entity
@Table(name="score")
//@Cache(usage = CacheConcurrencyStrategy.READ_ONLY)
public class Score {
	@Id
	@Column(name="id")
	private int id;
	
	@Column(name="score")
	private int score;
	
	@OneToOne(mappedBy="score")
	private SelectCourse selectCourse;
	
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public int getScore() {
		return score;
	}
	public void setScore(int score) {
		this.score = score;
	}
	public SelectCourse getSelectCourse() {
		return selectCourse;
	}
	public void setSelectCourse(SelectCourse selectCourse) {
		this.selectCourse = selectCourse;
	}
	@Override
	public String toString() {
		return "Score [id=" + id + ", score=" + score + "]";
	}
	
}
